<?php


require ROOT_PATH.'/Helper/admin_abstract.php';

class Action extends admin_abstract
{
    function index()
    {
        if (Request::isPost()) {
            $status = _POST('status');
            $ids = _POST('ids', array());
            !in_array($status, array(0,1,2)) && $status = 0;
            foreach ($ids as $key => $val) {
                _model('assets')->update(array('id'=>$val), array('is_publish'=>$status));
            }
            $this->redirect();
        } else {
            $data = _model('assets')->getList('WHERE is_publish < 2 ORDER BY add_time DESC', new Pager(20));
            $this->view->assign($data);
            $this->view->display('admin/verifyasset.html');
        }
    }
}


?>